var express = require('express');
var router = express.Router();
var controller = require('../controllers');

/* GET home page. */
router.get('/', function(req, res, next) {
    res.render('index', {
        title: 'ROTK预约挂号平台——您的就医首选',
        user: req.session.user
    });
});

router.get('/help', function (req, res, next) {
    res.render('help', {
        title: '帮助',
        user: req.session.user
    });
});

router.use('/user', controller.users);
router.use('/hospital', controller.hospitals);
router.use('/appointment', controller.appointments);
router.use('/doctor', controller.doctors);
router.use('/admin', controller.admin);


module.exports = router;
